package com.xiaoyu.tool.controller.client.user;

import com.xiaoyu.tool.response.ResultResponse;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiaoyu on 2018/10/31
 * 小程序登录流程图  https://www.processon.com/view/link/5c04a1eae4b056984bbe079f
 * 密码: AJ29
 */
@RestController
@RequestMapping(value = "/webAuthorized")
@Slf4j
public class UserMaAuthorizeController {

    /**
     * 初次初始化用户信息  已关注
     * */
    @ApiOperation("初次初始化用户信息,unionid未知")
    @PostMapping("/firstInit")
    public ResultResponse firstInitUserInfo(@ApiParam("微信code")@RequestParam("code") String code){

        return null;
    }


    /**
     * 再次初始化用户信息(详细信息)  未关注
     * */
    @ApiOperation("再次初始化用户信息,没有unionId")
    @PostMapping("/againInit")
    public ResultResponse againInitUserInfo(@ApiParam("微信code")@RequestParam("code") String code,
                                            @ApiParam("加密串")@RequestParam("encryptedData") String encryptedData,
                                            @ApiParam("加密串")@RequestParam("iv") String iv){
       return null;
    }







}



